<template>
  <div class="add">
    <el-input v-model="input.cont" placeholder="请输入任务"></el-input>
    <el-button type="primary" @click="add">添加事项</el-button>
  </div>
</template>

<script>
// @ is an alias to /src
import { mapMutations } from "vuex";

export default {
  name: "HomeView",
  data() {
    return {
      input: {
        id: "",
        cont: "",
        check: false,
      },
    };
  },
  components: {},
  computed: {},
  methods: {
    ...mapMutations("seek", ["seek_add"]),
    add() {
      this.seek_add(Object.assign({}, this.input));
      this.input.cont = "";
    },
  },
};
</script>
<style lang="less" scoped>
.el-input {
  width: 500px;
  margin-right: 10px;
}
</style>
